home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MACD 5
/
MACD 5.bin
/
workbench
/
boot
/
czesc_2
/
unlha
/
getfile.man
< prev
next >
Wrap
Text File
|
1992-12-09
|
5KB
|
182 lines
GetFile V2.0 User manual GetFile V2.0
NAME
GetFile
SYNOPSIS
GetFile [[DIR=DRAWER] Dir] [[FILE] File] [[TITLE] Titlestring]
[[VAR=VARIABLENAME] Variablename] [[PAT=PATTERN]
Pattern] [[OK=OKTEXT] OkText] [[CANCEL=CANCELTEXT]
CancelText] [[LEFT] LeftEdge] [[TOP] TopEdge] [[WIDTH]
Width] [[HEIGHT] Height] [GLOBAL] [NOFILES] [SAVE]
[MULTI=MULTISELECT]
DESCRIPTION
NOTE: This program required OS 2.04+ to run!
GetFile is a little command intended to be used in scripts
(Shell or ARexx), where an input from the user in the form of a
filename or a directory name is needed. The requester used is
the OS2.0 standard requester in ASL. If no file was selected,
the WARN flag will be set. GetFile is fully re-entrant, and can
be made resident. Beware for environment variable name
colissions if you use the GLOBAL flag.
The requester will appear on the screen of the current shell,
unless requesters for that shell have been disabled (there are
utilities which can do this), or it is a background shell with
no window, in which case it will appear on the Workbench
screen.
OPTIONS
There are no required arguments. The keywords (see below) are
only required if you do not enter the strings in the ordering
as above. Strings only need to be quoted if they contain
spaces.
DIR
This lets you specify the default directory. If none is
specified, the current directory will be the default
directory.
FILE
This lets you specify the default filename. Default is no
name.
TITLE
This optional string specifies the title in the requester
window. It defaults to "Select a file" if none is specified.
VAR
This string lets you specify in which local variable the result
will be stored (with full path specification). The default name
is GetFileResult. If you enter an empty string name (i.e. ""),
the result will be printed on standard output.
Page 1
GetFile V2.0 User manual GetFile V2.0
PAT=PATTERN
This string specifies the pattern to use. Only the filenames
that matches the pattern will be shown. It also implies for a
pattern gadget. Default pattern is "#?" (i.e. match all
files).
OK=OKTEXT
This string specifies the string to have in the OK gadget
(leftmost gadget in the bottom of the requester). Should be max
6-7 chars.
CANCEL=CANCELTEXT
This string specifies the string to have in the CANCEL gadget
(rightmost gadget in the bottom of the requester). Should be
max 6-7 chars.
LEFT
This number specifies the suggested leftedge for the requester
window.
TOP
This number specifies the suggested topedge for the requester
window.
WIDTH
This number specifies the suggested width for the requester
window.
HEIGHT
This number specifies the suggested height for the requester
window.
GLOBAL
By default, GetFile will place the answer in a local
environment variable. But this has one drawback: You can't
access the result easily from ARexx. If you have set this flag,
it will be quite easy. Simply peek in the ENV: directory. :)
NOFILES
If this keyword is present, then the user will not be able to
select any files, only directories will be shown. Very nice if
the user should select a destination directory for e.g.
harddisk installation.
SAVE
If this keyword is present, the requester will operate in save
mode, which is a bit different. First of all, double-clicking a
file will have no effect (except from selecting that file
ofcourse), and if the user enters a directory which doesn't
exist, there will be a requester asking if the directory in
question should be created. The look of the requester will be
Page 2
GetFile V2.0 User manual GetFile V2.0
somewhat different. This disables the MULTISELECT mode (see
below).
MULTI=MULTISELECT
If this keyword is present, the user will be able to select
multiple files (if the SAVE switch is used at the same time,
this keyword does nothing). The returned string will be
space-separated filenames with full path specification. If a
filename contains spaces, it will be quoted. This keyword is
mostly intended to be used from ARexx-scripts (since it is
quite easy to process the result in ARexx).
EXAMPLE
GetFile TITLE "Select destination directory" NOFILES
Echo "Files will be placed in $GetFileResult"
Page 3